<?php 
$Content = QContext::instance();
$base_url = $Content->requestUDI();
$search = $base_url;
$search['action'] = 'pointsearch';
$delete = $base_url;
$delete['action'] = 'del';
$add = $base_url;
$add['action'] = 'add';
$import = $base_url;
$import['action'] = 'import';

?>
<form id="pagerForm" method="get" action="<?php echo url($base_url,null,null,array('mode'=>'standard'));?>">
		<input type="hidden" name="pageNum" value="<?php echo $pagination['current'];?>" /> <!--【必须】value=1可以写死-->
		<input type="hidden" name="numPerPage" value="<?php echo $pagination['page_size'];?>" /> <!--【可选】每页显示多少条-->
		
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?php echo url($base_url,null,null,array('mode'=>'standard'));?>" method="get">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>订单编号：</label>
				<input type="text" name="orderid" value="<?php echo isset($param['orderid'])?$param['orderid']:'';?>"/>
				<input type="hidden" name="_querymethod[orderid]" value="like">
			</li>
			<li>
				<label>订单用户：</label>
					<input type="text" name="userid" value="<?php echo isset($param['userid'])?$param['userid']:'';?>"/>
					<input type="hidden" name="_querymethod[userid]" value="like">
		
			</li>
		</ul>
		
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<li><a class="button" href="<?php echo url($search,null,null,array('mode'=>'standard'));?>" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<!-- 
			<li><a class="edit" href="<?php echo url($add)?>/id/{id}" target="dialog" height="500" warn="请选择一个产品"><span>修改</span></a></li>
			<li class="line">line</li> -->
		</ul>
	</div>
	<table class="table" width="1200" layoutH="138">
		<thead>
			<tr>
				<th width="3%"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="10%" orderField="orderid" >订单ID</th>
				<th width="5%" orderField="ordertatolmoney">订单积分</th>
				<th width="8%" orderField="userid">订单用户</th>
				<th width="10%" orderField="createtime">下单时间</th>
				<th width="30%" align="center" orderField="weight">配送地址</th>
				<th width="13%" align="center" orderField="weight">收货人(电话)</th>
				<th width="7%" align="center" orderField="weight">状态</th>
				<th width="8%">操作</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($item as $k=>$v):?>
			<tr target="id" rel="<?php echo $v->id?>">
				<td><input name="ids" value="<?php echo $v->id?>" type="checkbox"></td>
				<td><?php echo $v->orderid?></td>
				<td><?php echo $v->orderpointer?> 点</td>
				<td><?php echo $v->userid;?></td>
				<td><?php echo date('Y-m-d G:i:s',$v->createtime)?></td>
				<td><?php echo $v->orderaddress;?></td>
				<td><?php echo $v->orderusername;?>(<?php echo $v->ordertell;?>)</td>
				<td><?php echo $v->statusstr;?></td>
				
				<td>
				<?php if($v->orderstatus == 2):?>
				<a href="<?php echo url('admin::orders/sendorders',array('orderid'=>$v->orderid),NULL,array('mode'=>'standard'));?>" target="ajaxTodo" title="是否对订单 :<?php echo $v->orderid?> 确认发货?">确认发货</a>
				<?php endif;?>
				</td>
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	<div class="panelBar">
			<div class="pages">
			<span>显示</span>
			<select name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==20)echo 'selected=selected';?>>20</option>
				<option value="50" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==50)echo 'selected=selected';?>>50</option>
				<option value="100" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==100)echo 'selected=selected';?>>100</option>
				<option value="200" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==200)echo 'selected=selected';?>>200</option>
			</select>
				<span>共 <?php echo $pagination['record_count'];?> 条</span>
			</div>
		
		<div class="pagination" targetType="navTab" totalCount="<?php echo $pagination['record_count'];?>" numPerPage="<?php echo $pagination['page_size'];?>" pageNumShown="10" currentPage="<?php echo $pagination['current'];?>" ></div>

	</div>
</div>